
import apiHelper from './apiHelper';

class getAddAddressService {
	
	//请求 ：地址列表
	getList(data) {
		let requestParam = {
			url: `${apiHelper.baseApiUrl}emsc-partner/b/a/gal`,
			data: {
				method: 'post',
				body: data
			}
		};
		return apiHelper.fetch(requestParam);
	}

	//请求 ：得到省市区地址
	region(data) {
		let requestParam = {
			url: `${apiHelper.baseApiUrl}emsc-partner/c/a/all`,
			data: {
				method: 'post',
				body: data
			}
		};
		return apiHelper.fetch(requestParam);
	}

	//请求 ：添加地址
	addAddress(data) {
		let requestParam = {
			url: `${apiHelper.baseApiUrl}emsc-partner/b/a/edit`,
			data: {
				method: 'post',
				body: data
			}
		};
		return apiHelper.fetch(requestParam);
	}

	//请求 ：删除地址
	deleteAddress(data) {
		let requestParam = {
			url: `${apiHelper.baseApiUrl}emsc-partner/b/a/dl`,
			data: {
				method: 'post',
				body: data
			}
		};
		return apiHelper.fetch(requestParam);
	}

	//请求 ：设置默认地址
	setDefaultAddress(data) {
		let requestParam = {
			url: `${apiHelper.baseApiUrl}emsc-partner/b/a/default`,
			data: {
				method: 'post',
				body: data
			}
		};
		return apiHelper.fetch(requestParam);
	}

}
// 实例化后再导出
export default new getAddAddressService()